package pattern13.basketball;

/**
 * 翻译
 * @author wdl
 */
public class Translator extends BasePlayer{
    /**
     * 声明一个实例化一个内部的外籍中锋对象，表明翻译者与外籍球员的关联
     */
    private ForeignCenter foreignCenter=new ForeignCenter();
    public Translator(String name) {
        super(name);
        foreignCenter.setName(name);
    }

    @Override
    public void attach() {
        foreignCenter.进攻();
    }

    @Override
    public void defence() {
        foreignCenter.防御();
    }
}
